package cn.wolfcode.luowowo.common.util;

import cn.wolfcode.luowowo.common.exception.logicException;

//判断参数的工具类
public class AssertUtil {
    public static void getLength(String phone, String msg) {
        if(phone==null||"".equals(phone.trim())){
            throw new logicException(msg);
        }
    }

    public static void getPassAndPass(String password, String rpassword, String msg) {
        if (password==null||rpassword==null){
            throw  new logicException("密码不能为空");
        }
        if(!password.equals(rpassword)){
            throw new logicException(msg);
        }
    }
}
